package pkg

import (
	"fmt"
	"github.com/Baidu-AIP/golang-sdk/aip/censor"
	"weekFirst/global"
)

func TextCheck(text string) bool {
	//如果是百度云ak sk,使用下面的客户端
	client := censor.NewCloudClient("ALTAKnxPoNDx0HuqYVaL0rDG4E", "3620007ebc3943a299cdf5ba8ed18579")
	res := client.TextCensor(text)
	fmt.Println(res)

	var example global.TextExample

	if example.Context != "合规" {
		return false
	} else {
		return true
	}

}
